package com.xnyzc.lhy.common.util;

import com.xnyzc.lhy.common.util.http.HttpRequestUtil;
import lombok.extern.slf4j.Slf4j;
import net.sf.json.JSONObject;

import java.io.IOException;

@Slf4j
public class RequestMethodUtil {

    public static String requestMethod(String signParameter, String url){
        String data="";
        try {
            data= HttpRequestUtil.requestPost(url, signParameter);
        } catch (IOException e) {
            log.info(e.getMessage());
        }
        return data;
    }

    public static String requestMethodJson(JSONObject json, String url){
        String data="";
        try {
            data= HttpRequestUtil.requestPostJson(url, json);
        } catch (IOException e) {
            log.info(e.toString());
        }
        return data;
    }
}
